USE News
GO

CREATE PROC spInsertNews
	@title nvarchar(200),
	@link nvarchar(200),
	@author nvarchar(200),
	@description text,
	@pubDate nvarchar(200)
AS
BEGIN
	DECLARE @count int
	SET @count = (Select Count(*) AS CHECKCOUNT from  NewsFeed  where Title LIKE '%'+ @title+'%')

	IF @count = 0
	BEGIN
		INSERT INTO NewsFeed(Title,Link,Author,[Description],PubDate)
		VALUES (@title,@link,@author,@description,@pubDate)
	END
	
END

select * from NewsFeed